package com.adnaan.backend.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;

import java.util.Date;

/**
 * author: adnaan
 * create: 2025-02-25 13:06
 * Description:
 */
@Data
@Tag(name = "浏览历史表")
@TableName("user_view_history")
public class ViewHistory {

    @Schema(name = "用户id")
    @TableId(value = "user_id", type = IdType.INPUT)
    private Long userId;

    @Schema(name = "文章id")
    private Long articleId;

    @Schema(name = "浏览进度")
    private Integer process;

    @Schema(name = "浏览时间")
    private Date viewTime;

    @Schema(name = "标题")
    @TableField(exist = false)
    private String title;

    @Schema(name = "封面")
    @TableField(exist = false)
    private String cover;
}
